import {
    totalConfig,
    propName
} from 'server/config/templateConfig';

let events = {
    1: (player) => {
        player.basicInfo.build = true
    },
    2: (player) => {
        player.basicInfo.build = true
    },
    3: (player) => {
        let basicInfo = player.basicInfo;
        let mapId = basicInfo.mapId;
        player.mapInfos[mapId].show = true;
    },
    4: (player) => {
        player.basicInfo.mainTaskId = 3;
    },
    5: (player) => { //调查骸骨
        let basicInfo = player.basicInfo;
        let mapId = basicInfo.mapId;
        player.basicInfo.mainTaskId = 7;
        player.basicInfo.compass = 1; //获得罗盘
    }
}

export default function eventHandle(eventId, player) {
    let fn = events[eventId];
    if (fn) {
        return fn(player);
    } else {
        console.log(`eventId:${eventId}不存在`);
    }

}